﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Zeta.Common;
using Zeta.Game.Internals.Actors;

namespace LocationTracker
{
    public class ActorLocation
    {
        
        public string Name;
        public string DiaObjectName;
        public int ActorSNO;
        public Vector3 Position;
        public int X;
        public int Y;
        public int Z;
        public bool IsElite;
        public bool IsUnique;
        public bool IsRare;
        public bool IsBoss;
        public bool IsGoblin;
        public bool IsBountyObjective;
        public bool IsCursed;
        public bool IsPortal;
        public int BountyObjectiveQuestId;

        private ActorLocationType type;
        public ActorLocationType Type 
        {
            get { return (type != ActorLocationType.Unknown) ? type : getActorType(); }
            set { type = value; }
        }
        
        private ActorLocationType getActorType() { 
           
            if (IsGoblin)
            {
                return ActorLocationType.Goblin;
            }
            else if (IsBountyObjective) 
            { 
                return ActorLocationType.Objective; 
            }
            else if (IsCursed) 
            { 
                return ActorLocationType.Event; 
            }
            else if (IsPortal) 
            { 
                return ActorLocationType.Portal; 
            }
            else if (IsUnique) 
            { 
                return ActorLocationType.Unique; 
            }
            else if (IsElite) 
            { 
                return ActorLocationType.Elite; 
            }
            else 
            { 
                return ActorLocationType.Unknown; 
            }
        }
        
    }

    public enum ActorLocationType
    {
        Unknown,
        Rare,
        Unique,
        Elite, 
        Goblin,
        Objective,
        Event,
        Portal
    }
    

}
